package models

import "time"

// 自定义表 记录用户什么时候收藏了什么文章
type User2CollModel struct {
	UserID    uint `gorm:"primaryKey"`
	ArticleID uint `gorm:"primaryKey"`
	CreatedAt time.Time
	// 非表结构
	UserModel    UserModel    `gorm:"foreignKey:UserID"`
	ArticleModel ArticleModel `gorm:"foreignKey:ArticleID"`
}

func (User2CollModel) TableName() string {
	return "user2_coll"
}
